// src/routers/index.js 或 src/router/index.js
import { createRouter, createWebHistory } from 'vue-router'
import VideoList from '@/pages/video/VideoList.vue'

const routes = [
    {
        path: '/',
        component: VideoList,
        name: 'Home'
    },
    {
        path: '/videos',
        component: VideoList,
        name: 'VideoList'
    },
    {
        path: '/:pathMatch(.*)*',
        redirect: '/'
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
